# -*- coding: utf-8 -*-

from django.db import models
from core.models import CoreModel, table_prefix
from apps.sys.user.models import User

"""在线文档"""


class OnlineDocument(CoreModel):
    title = models.CharField(max_length=200,verbose_name="标题") 
    content = models.TextField(verbose_name='内容') 
    author = models.ForeignKey(User,related_name="kms_online_set",on_delete=models.CASCADE,verbose_name="作者")
    

    def __str__(self) -> str:
        return self.title

    class Meta:
        db_table = table_prefix + "kms_online_document"
        verbose_name = '在线文档'
        verbose_name_plural = verbose_name
        ordering = ('-update_time',)
        

